

//状态栏设置数据
var data_searchBar = {}
//添加状态栏
function addSearchBar(e) {
    data_searchBar = e
}
//状态栏模块
var moduleSearchBar = Vue.component('module-searchbar', {
    template: '<div class="brick item module_searchBar" @click="select()">\
                <img class="logo" :src="dt.img_logo" alt="logo">\
                <img class="scan_logo" :src="dt.img_scan" alt="扫码图标">\
                <div class="layui-input-block">\
                  <input type="text" :placeholder="dt.text_search_placeholder" class="layui-input search_input">\
                </div>\
              </div>',
    data() {
        return {
            dt:{}
        }
    },
    methods:{
        select(){
            console.log('sub log -----------------')
            this.$parent.setRightView(moduleSearchBarSet)
        }
    },
    created() {
        console.log('create ------- '+ JSON.stringify(this.dt))
        this.dt = data_searchBar
    }
})
//状态栏模块设置参数
var moduleSearchBarSet = Vue.component('module-searchbar-set', {
    template: ' <div class="module_seaerchbar_set">\
    <div class="layui-form-item">\
      <label class="layui-form-label">搜索框提示</label>\
      <div class="layui-input-block">\
        <input type="text" name="title" required="" lay-verify="required" placeholder="搜索框提示" autocomplete="off" class="layui-input" :value="dt.text_search_placeholder">\
      </div>\
    </div>',
    data() {
        return {
            dt:{}
        }
    },
    methods:{
    },
    created() {
        this.dt = data_searchBar
    }
})